home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
demodisks
/
drives
/
1581-demo.lzh
/
change unit
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1994-10-19
|
2KB
|
49 lines
10 z$=chr$(0): b$=chr$(2):ln$="[155][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
15 poke53280,0:poke53281,0:gosub20:goto30
20 print "[147]"ln$:print"[159] change disk device number":println$:return
30 print " if all [146] disk units are still"
40 print " device nr 8, then power-off all"
50 print " but the first unit to be changed."
60 input " [155] old [146] device nr (8-15): ? 8 [157][157][157][157]";f
70 if f<8 or f>15 then print "[145][145][145]": goto 60
80 input " [155] new [146] device nr (8-15): ? 9 [157][157][157][157]";t
90 if t<8 or t>15 then print "[145][145][145]": goto 80
100 close 1:open 1,f,15: if st then 240
110 print#1,"m-r"chr$(255)chr$(255)
120 gosub 220: gosub 270
130 print "[155] unit-type/dos vers: ";a$
135 ifm=666then print#1,"u0>"+chr$(t):goto150
140 print#1,"m-w"chr$(m)z$b$chr$(t+32)chr$(t+64)
150 if st then 240
160 print "[155] device";f;"[155]changed to device";t
170 input "[155] change more units (y/n): ? n[157][157][157]";c$
180 if c$="n" then 260
190 if c$<>"y" then print "[145][145][145]": goto 170
200 print "[147]":gosub20:print"[155] ok, power-on next unit to change"
210 goto 60
220 get#1,c$: c=asc(c$+z$)
230 if st=0 then return
240 print "[155] device error on";f: goto 260
250 print "[155] unknown device type";f
260 close 1: end
270 if c=198 then m=12: goto 350
280 if c=255 then m=12: a$="d90xx / v3.0":gosub900
290 if c=254 then m=119: a$="1571-1541/v3.0-2.6"
300 if c=242 then m=12: a$="8050 / v2.5"
310 if c=241 then m=12: a$="1551 / v2.6"
320 if c=226 then m=50: a$="2040 / v1.2"
330 if c=213 then m=12: a$="4040 / v2.1"
340 return
350 print#1,"m-r"chr$(234)chr$(16)
360 gosub 220: if c>1 then 2700
370 if c=0 then a$="4040 / v2.7":return
380 print#1,"m-r"chr$(172)chr$(16)
390 gosub 220: if c<1 or c>2 then 250
400 if c=1 then a$="8050 / v2.7"
410 if c=2 then a$="8250 / v2.7"
420 return
900 print#1,"m-r"chr$(3)chr$(164)chr$(1):get#1,a$:a$=a$+chr$(0)
910 ifasc(a$)=0thenreturn
920 ifa$="8"thenm=666
930 m=666:a$="1581 / v10":return